// @FileName  :cal.c
// @Time      :2024/4/5 0:05
// @Author    :YKW
//# include <bits/stdc++.h>
//using namespace std;
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <string.h>
# include <stdlib.h>

// 计算表达式
char line[300];
struct node {
    int type;
    double n;
    char op;
} s1[300], s2[300];
double ans[300];

int pri(char i) {
    if (i == '+' || i == '-') return 1;
    else if (i == '/' || i == '*') return 2;
    else return -1;
}

double ccal(double b, double a, char c) {
    if (c == '+') return a + b;
    else if (c == '-') return a - b;
    else if (c == '*') return a * b;
    else if (c == '/') return a / b;
}

int main() {
    int top1 = -1, top2 = -1, cnt = -1;
    fgets(line, sizeof(line), stdin);
    for (int i = 0; i < strlen(line); i++) {
        if (line[i] == '=')break;
        else if (line[i] == ' ')continue;
        else if (line[i] == '(') { s1[++top1].type = 1, s1[top1].op = '('; }
        else if (line[i] == ')') {
            while (s1[top1].op != '(')
                s2[++top2] = s1[top1--];
            top1--;//去掉 (
        } else if (pri(line[i]) > 0) {
            if (top1 == -1 || s1[top1].op == '(' || (pri(s1[top1].op) < pri(line[i])))
                s1[++top1].op = line[i], s1[top1].type = 1;
            else {
                while (pri(s1[top1].op) >= pri(line[i])) {
                    s2[++top2] = s1[top1--];
                }
                s1[++top1].op = line[i], s1[top1].type = 1;
            }
        } else if (line[i] >= '0' && line[i] <= '9') {
            int cur = 0;
            while (line[i] >= '0' && line[i] <= '9')
                cur = cur * 10 + line[i++] - '0';
            s2[++top2].n = (double) cur;
            s2[top2].type = 0;
            i--;
        }
    }
    while (top1 >= 0)
        s2[++top2] = s1[top1--];
    for (int i = 0; i <= top2; i++) {
        if (s2[i].type == 0) ans[++cnt] = s2[i].n;
        else {
            double res = ccal(ans[cnt], ans[cnt - 1], s2[i].op);
            ans[--cnt] = res;
        }
    }
    printf("%.2lf", ans[0]);
}